class BtnRuntime extends Laya.Button {
    public scaleTime = 100;

    constructor() {
        super();
        this.on(Laya.Event.MOUSE_DOWN, this, this.OnMouseDown);
        this.on(Laya.Event.MOUSE_UP, this, this.OnMouseUp);
        this.on(Laya.Event.MOUSE_OUT, this, this.OnMouseUp);
    }

    OnMouseDown() : void {
        Laya.Tween.to(this, {scaleX:0.8,scaleY:0.8}, this.scaleTime);
    }

    OnMouseUp() : void {
        Laya.Tween.to(this, {scaleX:1,scaleY:1}, this.scaleTime);
    }
}